from app import db

# 会员日统计
class StatDailyMember(db.Model):
    __tablename__ = 'stat_daily_member'
    __table_args__ = (
        db.Index('idx_date_member_id', 'date', 'member_id'),
    )

    id = db.Column(db.Integer, primary_key=True)
    date = db.Column(db.Date, nullable=False)
    member_id = db.Column(db.Integer,db.ForeignKey("member.id"), nullable=False)
    total_shared_count = db.Column(db.Integer, nullable=False, comment="当日分享总次数")
    total_pay_money = db.Column(db.Numeric(10, 2), nullable=False, comment="当日付款总金额")
    updated_time = db.Column(db.DateTime, nullable=False)
    created_time = db.Column(db.DateTime, nullable=False)
